var Utils = {
	get: function(elementId){
		return document.getElementById(elementId);
	},
	
	addEvent: function(obj, type, func){
		if (obj.attachEvent){
			obj.attachEvent("on" + type, func);
		}else if (obj.addEventListener){
			obj.addEventListener(type, func, false);
		}
	}
};

if (!window.requestAnimationFrame) {
	window.requestAnimationFrame = (function(){
		return window.webkitRequestAnimationFrame ||
			window.mozRequestAnimationFrame ||
			window.oRequestAnimationFrame ||
			window.msRequestAnimationFrame;
	})();
}

Math.iRandom = function(a, b){
	if (arguments.length == 2){
		return a + Math.round(Math.random() * (b - a));
	}else{
		return Math.round(Math.random() * a);
	}
};